﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    /// <summary>
    /// 商品表
    /// </summary>
    [SqlSugar.SugarTable("corecmsfood")]
    public partial class corecmsfood
    {
        /// <summary>
        /// 序列
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public Int64 id { get; set; }


        /// <summary>
        /// 品牌id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "corpId", IsNullable = false)]
        public Int32 corpId { get; set; }

        /// <summary>
        /// 上级商户Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "parentTenantId", IsNullable = false)]
        public Int32 parentTenantId { get; set; }

        /// <summary>
        /// 门店id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "storeId", IsNullable = false)]
        public long storeId { get; set; }

        /// <summary>
        /// 商品分类id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodTypeId", IsNullable = false)]
        public Int64 foodTypeId { get; set; }

        /// <summary>
        /// 默认规格id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodSpecId")]
        public Int64 foodSpecId { get; set; }

        /// <summary>
        /// 商品类型(1.普通菜；2.套菜；3.线下临时菜；4.打包盒)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "type", IsNullable = false)]
        public Int32 type { get; set; }

        /// <summary>
        /// 商品编码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "number", IsNullable = false)]
        public String number { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "name", IsNullable = false)]
        public String name { get; set; }

        /// <summary>
        /// 商品别名
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "byName", IsNullable = false)]
        public String byName { get; set; } = "";

        /// <summary>
        /// 支持业务类型可多选（1.堂食；2.外卖；3.自提；）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "businessType", IsNullable = true)]
        public String businessType { get; set; }

        /// <summary>
        /// 商品状态(0停售,1在售)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sellStatus", IsNullable = false)]
        public int? sellStatus { get; set; }

        /// <summary>
        /// 是否多规格
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "specFlag", IsNullable = false)]
        public bool specFlag { get; set; }


        /// <summary>
        /// 是否删除
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isDelete", IsNullable = false)]
        public bool isDelete { get; set; }

        /// <summary>
        /// 是否称重
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isHeft", IsNullable = true)]
        public bool? isHeft { get; set; }

        /// <summary>
        /// 数字助记码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "helpCode", IsNullable = true)]
        public String helpCode { get; set; }

        /// <summary>
        /// 拼音助记码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "PinYin", IsNullable = true)]
        public String pinYin { get; set; }

        /// <summary>
        /// 保质期
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "warrantyValue", IsNullable = true)]
        public Int32 warrantyValue { get; set; }

        /// <summary>
        /// 保质期单位（0天；1年；2月；3小时；4分钟）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "warrantyType", IsNullable = true)]
        public Int32? warrantyType { get; set; }

        /// <summary>
        /// 是否需要打印
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isPrint", IsNullable = true)]
        public bool? isPrint { get; set; }

        /// <summary>
        /// 收银端是否允许改价
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isChangePrice", IsNullable = true)]
        public bool? isChangePrice { get; set; }

        /// <summary>
        /// 收银端是否允许打折
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isDiscount", IsNullable = true)]
        public bool isDiscount { get; set; }

        /// <summary>
        /// 最低折扣
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "minDiscount", IsNullable = true)]
        public Decimal minDiscount { get; set; } = 0;

        /// <summary>
        /// 起售份数
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "upSell", IsNullable = true)]
        public Int32? upSell { get; set; }

        /// <summary>
        /// 增量售卖(改成：允许前台赠送,0允许，1不允许)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "addSell", IsNullable = true)]
        public Int32? addSell { get; set; }

        /// <summary>
        /// 商品图片
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "image", IsNullable = true)]
        public String image { get; set; }

        /// <summary>
        /// 出品部门
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "departId", IsNullable = true)]
        public Int64? departId { get; set; }

        /// <summary>
        /// 商品描述
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "remark", IsNullable = true)]
        public String remark { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "modifyTime", IsNullable = true)]
        public Int64? modifyTime { get; set; }

        /// <summary>
        /// 商品排序
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sort", IsNullable = true)]
        public Int32? sort { get; set; }

        /// <summary>
        ///积分类型（0：固定积分，1：不积分，2：销售额百分比）
        /// </summary>
        [SugarColumn(ColumnName = "pointType", IsNullable = true)]
        public System.Int32? pointType { get; set; }


        /// <summary>
        ///积分值（-1表示不参与）
        /// </summary>
        [SugarColumn(ColumnName = "pointValue", IsNullable = true)]
        public System.Decimal? pointValue { get; set; }

        ///库存数量
        /// </summary>
        [SugarColumn(ColumnName = "quantity", IsNullable = true)]
        public System.Decimal? quantity { get; set; }

        /// <summary>
        /// 组织机构Id
        /// </summary>
        [SugarColumn(ColumnName = "organizationId", IsNullable = true)]
        public System.Int32 organizationId { get; set; } = 0;

        /// <summary>
        /// 产地
        /// </summary>
        [SugarColumn(ColumnName = "place", IsNullable = true)]
        public string place { get; set; }

        /// <summary>
        /// 有效天数
        /// </summary>
        [SugarColumn(ColumnName = "periodDay", IsNullable = true)]
        public int periodDay { get; set; } = 0;

        /// <summary>
        /// 商品类型(0标准商品,1称重商品,2计件商品)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "stand", IsNullable = false)]
        public Int32 stand { get; set; }
    }
}
